package com.tanglongan.concurrent._basic;

public class Demo20 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Demo20Thread();
        t.start();
        Thread.sleep(10);
        t.suspend();
        System.out.println("main结束");
    }
}

class Demo20Thread extends Thread {
    private long i = 0;

    @Override
    public void run() {
        while (true) {
            i++;
            System.out.println("i=" + i);
        }
    }
}